from flask_wtf import FlaskForm
from wtforms import IntegerField, TextField, TextAreaField, StringField, FieldList, FormField, PasswordField, DateField


# 登录界面表单
class LogInForm(FlaskForm):
    user = IntegerField('用户名')
    password = PasswordField('密码')
    message = TextField('显示信息')
    name = TextField('名字')


# admin界面表单
class AdminForm(FlaskForm):
    name = TextField('显示名称')
    school_rool_manage = StringField('学籍管理')
    teacher_manage = StringField('老师管理')


# 学籍管理
class AdminStudentManagement(FlaskForm):
    student_id = IntegerField()
    student_name = StringField()
    student_gender = StringField()
    student_telephone = StringField()
    student_class_id = IntegerField()


class AdminStudentManagementList(FlaskForm):
    student_management_list = FieldList(FormField(AdminStudentManagement))


# 老师管理
class AdminTeacherManagement():
    teacher_id = IntegerField()
    teacher_name = StringField()
    teacher_gender = StringField()
    teacher_telephone = StringField()
    teacher_course_id = StringField()


class AdminTeacherManagementList(FlaskForm):
    teacher_management_list = FieldList(FormField(AdminStudentManagement))


# 成绩管理
class AdminMarkManagement():
    mark_id = IntegerField()
    Student_id = IntegerField()
    course_id = IntegerField()
    mark = IntegerField()


class AdminMarkManagementList(FlaskForm):
    mark_management_list = FieldList(FormField(AdminMarkManagement))


# 选课管理
class AdminChoiseCourseManagement():
    teacher_id = IntegerField()
    student_id = IntegerField()


class AdminChoiseCourseManagementList(FlaskForm):
    choise_course_management_list = FieldList(FormField(AdminChoiseCourseManagement))

#课表编排
class AdminSchoolTimetableLayout():
    pass


# student界面表单
# 五个表单
class StudentSchoolTimetable(FlaskForm):
    week = StringField('星期')
    time = StringField('时间')
    place = StringField('地点')
    teacher = StringField('老师')
    course = StringField('课程')


class StudentSchoolTimetableList(FlaskForm):
    timetable_list = FieldList(FormField(StudentSchoolTimetable))


# 学生信息
class StudentMessage(FlaskForm):
    student_id = IntegerField('学号')
    name = StringField()
    gender = StringField()
    telephone = StringField()
    class_id = IntegerField()
    major = StringField()
    grade = IntegerField()
    clas = StringField()


# 选课
class StudentChoiseCourse(FlaskForm):
    teacher_id = IntegerField()
    teacher_name = StringField()
    course = StringField()
    count = IntegerField()


class StudentChoiseCourseList(FlaskForm):
    student_choise_course_list = FieldList(FormField(StudentChoiseCourse))
    teacher_name = StringField()


# 教师评价
class StudentAssessTeacher(FlaskForm):
    teacher = StringField()
    assess = StringField()


class StudentAssessTeacherList(FlaskForm):
    assess_list = FieldList(FormField(StudentAssessTeacher))


# 毕设选择
class StudentChoiseDesign(FlaskForm):
    design_id = IntegerField()
    teacher = StringField()
    student_id = IntegerField()
    design = StringField()


class StudentChoiseDesignList(FlaskForm):
    design_list = FieldList(FormField(StudentChoiseDesign))
    choise_design = FormField(StudentChoiseDesign)


# teacher表单
# 成绩管理
class TeacherMarkManegement(FlaskForm):
    student_id = IntegerField()
    student_name = StringField()
    mark = IntegerField()
    mark_id = IntegerField()


class TeacherMarkManegementList(FlaskForm):
    mark_list = FieldList(FormField(TeacherMarkManegement))


# 教师课表
class TeacherSchoolTimetable(FlaskForm):
    week = StringField()
    time = StringField()
    classroom = StringField()
    major = StringField()
    grade = StringField()
    clas = StringField()


class TeacherSchoolTimetableList(FlaskForm):
    timetable_list = FieldList(FormField(TeacherSchoolTimetable))


# 毕业设计
class TeacherDesignManagement(FlaskForm):
    design_id = IntegerField()
    design_name = StringField()
    student_name = StringField()
    major = StringField()
    grade = StringField()
    clas = StringField()


class TeacherDesignManagementList(FlaskForm):
    design_list = FieldList(FormField(TeacherDesignManagement))


# 评价查询
class TeacherAssess(FlaskForm):
    student_name = StringField()
    content = StringField()


class TeacherAssessList(FlaskForm):
    assess_list = FieldList(FormField(TeacherAssess))
